package com.heima.homeservicemanagementsystem.utils;

import java.util.Random;

/**
 * @Description
 * @Author jcf
 * @Date 2025/3/11
 */
public class CodeUtils {


    public static String generateCode() {
        Random random = new Random();

        // 生成四位随机数字
        int randomNumber = 1000 + random.nextInt(9000);  // 1000到9999之间的数字
        String str = Integer.toString(randomNumber);
        return str;
    }
}
